package demo01;

public class OperationFactory {

  public static Operation createOperation(String s){
       Operation operation=null;
      switch (s){
          case "+":operation=new OperationAdd();break;
          case "*":operation=new OperationSub();break;
      }
      return operation;
  }
}
